'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 历史金币数量达到N
 * @author sundbcn@gmail.com (sun debing)
 */

var Task = function () {

};

Task.prototype.addStatic = function (static_list, add_gold) {
    if (static_list.total_gold < 0) {
        static_list.total_gold = 0;
    }
    static_list.total_gold = static_list.total_gold || 0;
    static_list.total_gold += +add_gold;
};

/**
 * 获取任务进度
 */
Task.prototype.getProgress = function (static_list) {
    return static_list.total_gold || 0;
};

module.exports = new Task();
